/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */
import type { ResponseStruct } from '#/global'

export interface MenuVo {
  type?: '',
  name?: '',
  url?: '',
  pay_userid?: '',
  pay_password?: '',
  username?: '',
  password?: '',
  otherConf?: '',
  page?:1,
  limit?:10,
  id?:'',
  class?:'',
  listid?:"",
  Docking?:'',
  priceName_id?:""
}
//判断显示是否显示本地
export function isBind7NiuYun(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/isBind7NiuYun', data)
}
export function getDockingUserlnfo1(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/getDockingUserinfo', data)
}
export function categoryDel(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/categoryDel', data)
}

export function categorySave(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/categorySave', data)
}
export function addDockGoods(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/addDockGoods', data)
}
export function categorygoodlist(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/categorygoodlist', data)
}
export function setdocking(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/setdocking', data)
}
export function page(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/getDockList', data)
}
export function getLocalCatePage(): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/getLocalCate')
}
export function dockingMenuPage(): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/dockingMenuList')
}
export function getGoodPriceReadyList(): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/getGoodPriceReadyList')
}
export function AddDock(data: MenuVo): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/categoryedit', data)
}
export function create(data: MenuVo): Promise<ResponseStruct<null>> {
  return useHttp().post('/admin/menu', data)
}

export function save(id: number, data: MenuVo): Promise<ResponseStruct<null>> {
  return useHttp().put(`/admin/menu/${id}`, data)
}

export function deleteByIds(ids: number[]): Promise<ResponseStruct<null>> {
  return useHttp().delete('/admin/menu', { data: ids })
}
//余额
export function balance(Docking): Promise<ResponseStruct> {
  return useHttp().post('/DockManager/getDockingUserInfo', { Docking })
}
